/**
 * Created by Administrator on 2017/5/17.
 */
$(function () {
// 定制我的喜宴--------------------------------
    $('#begin-diy').on('click',function () {
        showPop('#begin-pop');
    });

    //查看活动规则
    $('#see-rule').on('click',function () {
        $navIcon.fadeIn();
        $('.homepage,.diy-desk-box').css('transform','translateY(-100%)');
        $('.back .close').click();
    });

    //规则按钮马上办喜宴
    $('#start-diy').on('click',function () {
        $('.rule,.diy-box').css('transform','translateY(-100%)');
    });

    //添加桌椅
    $('.wrapper-add').on('click',function () {
        $(this).before($wrapper.clone());
        $('.is-master-first .zoom-in em:last').html($('.is-master-first .zoom-in').length);
    });

    //生成喜宴，分享喜事
    $('#create').on('click',function(){
        showPop('#word-pop');
    });

//领喜酒--------------------------------
    $('#get-wine').on('click',function () {
        $navIcon.fadeIn();
        $('.homepage,.get-wine-box').css('transform','translateY(-100%)');
        $('.guangdong').addClass('pro-animate');
    });

    //找到离我最近的领取点
    $('#find-lately').on('click',function () {
        $('.get-wine,.lately-map').css('transform','translateY(-100%)');
        showMap();
    });

    //兑换码
    $('.get-wine .map > div > div').on('click',function () {
        $('.get-wine,.exchange-box').css('transform','translateY(-100%)');
    });

    //切换省份
    $('#cuted').on("click",function(){
        $('#cuted span').toggle();
        $('#cuted .iconfont').toggleClass('i-rotate');
        $('.map > div').toggleClass('pro-animate');
    });

    //确认兑换
    $('#sure-exchange').on('click',function () {
        showPop('#exchange-pop');
    });
});